﻿using Base.Entities.Enums;
using System.Collections.Generic;

namespace System
{
    /// <summary>
    /// 全局配置文件
    /// </summary>
    public class ConfigManager
    {
        #region 配置信息

        private static int? _IntValue;
        /// <summary>
        /// 
        /// </summary>
        public static int IntValue => _IntValue ?? (_IntValue = ConfigHelper.GetConfig(nameof(IntValue)).ToInt32()).Value;
        #endregion

        #region 程序目录
        /// <summary>
        /// 程序目录
        /// </summary>
        public readonly string SoftDirectory = Environment.CurrentDirectory;
        #endregion

        #region 当前所处模块

        private static ModuleEnum currModule = ModuleEnum.ModuleA;
        /// <summary>
        /// 当前所处模块
        /// </summary>
        public static ModuleEnum CurrModule
        {
            get
            {
                return currModule;
            }
            set
            {
                currModule = value;
            }
        }
        #endregion
    }
}
